package com.github.baichuan.application.scaffold.rest.dto.app;

import com.github.baichuan.application.scaffold.rest.domain.app.UpgradeMode;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Getter;

@Schema(title = "APP版本")
@Getter
public class AppVersionForm {
//    @Schema(title = "APP应用")
//    @NotBlank(message = "APP应用不能为空")
//    private String appId;

    @Schema(title = "版本号")
    @NotBlank(message = "版本号不能为空")
    @Pattern(regexp = "^\\d+\\.\\d+\\.\\d+$")
    private String version;

    @Schema(title = "升级模式")
    @NotNull(message = "升级模式不能为空")
    private UpgradeMode upgradeMode;

    @Schema(title = "版本介绍")
    @NotBlank(message = "版本介绍不能为空")
    private String intro;

    @Schema(title = "升级文件")
    @NotBlank(message = "升级文件不能为空")
    private String file;
}
